<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\Ad
 *
 * @ORM\Table(name="ad")
 * @ORM\Entity
 */
class Ad
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var date $date
     *
     * @ORM\Column(name="date", type="date", nullable=false)
     */
    private $date;

    /**
     * @var text $content
     *
     * @ORM\Column(name="content", type="text", nullable=false)
     */
    private $content;

    /**
     * @var string $author
     *
     * @ORM\Column(name="author", type="string", length=255, nullable=false)
     */
    private $author;

    /**
     * @var string $email
     *
     * @ORM\Column(name="email", type="string", length=255, nullable=true)
     */
    private $email;

    /**
     * @var string $phone
     *
     * @ORM\Column(name="phone", type="string", length=255, nullable=false)
     */
    private $phone;

    /**
     * @var boolean $isDel
     *
     * @ORM\Column(name="is_del", type="boolean", nullable=false)
     */
    private $isDel;

    /**
     * @var datetime $promotedDate
     *
     * @ORM\Column(name="promoted_date", type="datetime", nullable=true)
     */
    private $promotedDate;

    /**
     * @var Catalog\SubCategory
     *
     * @ORM\ManyToOne(targetEntity="Catalog\SubCategory")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="sub_cat_id", referencedColumnName="id")
     * })
     */
    private $subCat;

    /**
     * @var Catalog\Users
     *
     * @ORM\ManyToOne(targetEntity="Catalog\Users")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    private $user;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param date $date
     * @return Ad
     */
    public function setDate($date)
    {
        $this->date = $date;
        return $this;
    }

    /**
     * Get date
     *
     * @return date 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set content
     *
     * @param text $content
     * @return Ad
     */
    public function setContent($content)
    {
        $this->content = $content;
        return $this;
    }

    /**
     * Get content
     *
     * @return text 
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set author
     *
     * @param string $author
     * @return Ad
     */
    public function setAuthor($author)
    {
        $this->author = $author;
        return $this;
    }

    /**
     * Get author
     *
     * @return string 
     */
    public function getAuthor()
    {
        return $this->author;
    }

    /**
     * Set email
     *
     * @param string $email
     * @return Ad
     */
    public function setEmail($email)
    {
        $this->email = $email;
        return $this;
    }

    /**
     * Get email
     *
     * @return string 
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set phone
     *
     * @param string $phone
     * @return Ad
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;
        return $this;
    }

    /**
     * Get phone
     *
     * @return string 
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * Set isDel
     *
     * @param boolean $isDel
     * @return Ad
     */
    public function setIsDel($isDel)
    {
        $this->isDel = $isDel;
        return $this;
    }

    /**
     * Get isDel
     *
     * @return boolean 
     */
    public function getIsDel()
    {
        return $this->isDel;
    }

    /**
     * Set promotedDate
     *
     * @param datetime $promotedDate
     * @return Ad
     */
    public function setPromotedDate($promotedDate)
    {
        $this->promotedDate = $promotedDate;
        return $this;
    }

    /**
     * Get promotedDate
     *
     * @return datetime 
     */
    public function getPromotedDate()
    {
        return $this->promotedDate;
    }

    /**
     * Set subCat
     *
     * @param Catalog\SubCategory $subCat
     * @return Ad
     */
    public function setSubCat(\Catalog\SubCategory $subCat = null)
    {
        $this->subCat = $subCat;
        return $this;
    }

    /**
     * Get subCat
     *
     * @return Catalog\SubCategory 
     */
    public function getSubCat()
    {
        return $this->subCat;
    }

    /**
     * Set user
     *
     * @param Catalog\Users $user
     * @return Ad
     */
    public function setUser(\Catalog\Users $user = null)
    {
        $this->user = $user;
        return $this;
    }

    /**
     * Get user
     *
     * @return Catalog\Users 
     */
    public function getUser()
    {
        return $this->user;
    }
}